Skip to content

Don't notify onError in MakeAsyncHttpRequestStage #779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

dagnir
Copy link
Contributor

@dagnir dagnir commented Oct 25, 2018

Description

Move the notification back on AsyncRetryable stage so we can decide whether to
call onError based on whether we are retrying or not.

Motivation and Context

Fix onError behavior.

Testing

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have read the README document
  • I have added tests to cover my changes
  • All new and existing tests passed
  • A short description of the change has been added to the CHANGELOG

License

  • I confirm that this pull request can be released under the Apache 2 license

@@ -128,6 +132,7 @@ private void retryResponseIfNeeded(Response<OutputT> resp, CompletableFuture<Res
}

if (shouldRetry(resp.httpResponse(), resp.exception())) {
responseHandler.onError(err);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment about the last error being delivered in the client? That's a bit tricky and not obvious from the code.

@dagnir dagnir force-pushed the on-error-async-retryable-stage branch from 6d122a1 to 1a2e25a Compare October 25, 2018 21:08
Move the notification back on AsyncRetryable stage so we can decide whether to
call onError based on whether we are retrying or not.
@dagnir dagnir force-pushed the on-error-async-retryable-stage branch from 1a2e25a to 3622883 Compare October 25, 2018 22:32
@dagnir dagnir merged commit e87a1db into aws:master Oct 25, 2018
aws-sdk-java-automation added a commit that referenced this pull request Apr 1, 2020
…688b224b

Pull request: release <- staging/da8c22c4-9478-4be3-af16-8607688b224b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants